package demo;
import java.util.*;

public class MapData implements Comparable<MapData> {
	double lat;
	double lng;
	String id;
	Date dateTime;
	
	public double getLat() {
		return lat;
	}
	public void setLat(double lat) {
		this.lat = lat;
	}
	public double getLng() {
		return lng;
	}
	public void setLng(double lng) {
		this.lng = lng;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public Date getDateTime() {
		return dateTime;
	}
	public void setDateTime(Date dateTime) {
		this.dateTime = dateTime;
	}

	@Override
	public int compareTo(MapData o) {
		if (getDateTime().getTime() < o.getDateTime().getTime()) return -1;
		else if (getDateTime().getTime() > o.getDateTime().getTime()) return 1;
		return 0;
	}
	
	
}
